import React from 'react'
//使用自定义hooks封装防抖，防止登录按钮暴力点击
function useFandou(cb,time=400) {
    let timer=null
  return (...gras)=>{
     clearTimeout(timer)
     timer=setTimeout(()=>{
       cb.apply(this,gras)
     },time)
  }
}
export default useFandou
